package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TbPurchaseOrderMapper;
import com.ruoyi.order.domain.TbPurchaseOrder;
import com.ruoyi.order.service.ITbPurchaseOrderService;

/**
 * 药品采购订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class TbPurchaseOrderServiceImpl implements ITbPurchaseOrderService 
{
    @Autowired
    private TbPurchaseOrderMapper tbPurchaseOrderMapper;

    /**
     * 查询药品采购订单
     * 
     * @param orderId 药品采购订单主键
     * @return 药品采购订单
     */
    @Override
    public TbPurchaseOrder selectTbPurchaseOrderByOrderId(Long orderId)
    {
        return tbPurchaseOrderMapper.selectTbPurchaseOrderByOrderId(orderId);
    }

    /**
     * 查询药品采购订单列表
     * 
     * @param tbPurchaseOrder 药品采购订单
     * @return 药品采购订单
     */
    @Override
    public List<TbPurchaseOrder> selectTbPurchaseOrderList(TbPurchaseOrder tbPurchaseOrder)
    {
        return tbPurchaseOrderMapper.selectTbPurchaseOrderList(tbPurchaseOrder);
    }

    /**
     * 新增药品采购订单
     * 
     * @param tbPurchaseOrder 药品采购订单
     * @return 结果
     */
    @Override
    public int insertTbPurchaseOrder(TbPurchaseOrder tbPurchaseOrder)
    {
        return tbPurchaseOrderMapper.insertTbPurchaseOrder(tbPurchaseOrder);
    }

    /**
     * 修改药品采购订单
     * 
     * @param tbPurchaseOrder 药品采购订单
     * @return 结果
     */
    @Override
    public int updateTbPurchaseOrder(TbPurchaseOrder tbPurchaseOrder)
    {
        return tbPurchaseOrderMapper.updateTbPurchaseOrder(tbPurchaseOrder);
    }

    /**
     * 批量删除药品采购订单
     * 
     * @param orderIds 需要删除的药品采购订单主键
     * @return 结果
     */
    @Override
    public int deleteTbPurchaseOrderByOrderIds(Long[] orderIds)
    {
        return tbPurchaseOrderMapper.deleteTbPurchaseOrderByOrderIds(orderIds);
    }

    /**
     * 删除药品采购订单信息
     * 
     * @param orderId 药品采购订单主键
     * @return 结果
     */
    @Override
    public int deleteTbPurchaseOrderByOrderId(Long orderId)
    {
        return tbPurchaseOrderMapper.deleteTbPurchaseOrderByOrderId(orderId);
    }
}
